home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 19
/
Aminet 19 (1997)(GTI - Schatztruhe)[!][Jun 1997].iso
/
Aminet
/
comm
/
cnet
/
cnet_wof.lha
/
wof.lha
/
support.lha
/
AMaint
< prev
next >
Wrap
Text File
|
1997-04-17
|
3KB
|
87 lines
/**************************************************************************\
$VER: WOF AMaint, v6.51 (17-Apr-97) by Dotoran of Frontiers!
\**************************************************************************/
options results;signal on SYNTAX;signal on ERROR;signal on IOERR
a=sourceline(2);parse var a . ", "ver" ("vdate")" .
tr=transmit;se=sendstring;gc=getchar;gu=getuser;gs=getscratch;mg=maygetchar
a="rexxsupport.library";if ~show("l",a) then if ~addlib(a,0,-30) then exit
parse source . . fp .;df=left(fp,max(lastpos('/',fp),lastpos(':',fp)))
tr "f1Wheel of Fortune AMaint, "word(sourceline(2),4)
se "n1Reading Suspension Slots..."
dfile=df ; tfile=df"Texts/"
call open(f1,dfile"!Settings","r")
do 4 ; a=readln(f1) ; end
call close(f1) ; save=0
do i=1 to 6
parse var a Sid.i"|"Sok.i"|"a
end i ; d1=date("i")
tr "Done.n2Examining Slots:n1"
do i=1 to 6 ; se " Slot # "i": "
if datatype(Sid.i,"n")=1 then do ; loadscratch Sid.i ; st=0
savescratch (-Sid.i) ; getscratch 1 ; han=result ; end
if Sid.i="" then do ; tr "Empty!" ; iterate ; end
if Sok.i="Never" then do
tr "Prohibit ID # "Sid.i" ("han") from playing!" ; iterate ; end
d2=date("i","19"Sok.i,"s")
if d2-d1>0 then tr "ID # "Sid.i" ("han") Suspended another "d2-d1" days!"
if d2-d1<=0 then do ; Sid.i="" ; Sok.i="" ; save=1
tr "ID # "Sid.i" ("han") Suspension over; clearing slot."
end
end i
if save=1 then do ; se "n1Saving changed Suspension Slots..."
a="" ; do i=1 to 6 ; a=a||Sid.i"|"Sok.i"|" ; end i ; a=a"x"
call open(f1,dfile"!Settings","r")
do i=1 to 13 ; l.i=readln(f1) ; end i ; l.i=a
call close(f1)
call open(f1,dfile"!Settings","w")
do i=1 to 13 ; call writeln(f1,l.i) ; end i
call close(f1) ; tr "Done!"
end
/* Verify Players */
call open(f1,tfile'Players','r')
bad=0
do i=1 until eof(f1)
p.i=readln(f1)
end i
total=i-1
call close(f1)
tr "@4n1Verifying Players...n1"
do i=1 to total
parse var p.i han.i'|'j
se ' 'han.i
setobject "1" ; putuser 1109799 /* Activate ! quick mode */
findaccount han.i ; id.i=result
if id.i<1 then do
tr ' not found.' ; bad=bad+1 ; p.i='' ; end
else tr ' found.'
end i
setobject "0" ; putuser 1109799 /* Deactivate ! quick mode */
if bad>0 then do
call open(f1,tfile'Players','w')
do i=1 to total
if p.i~='' then call writeln(f1,p.i)
end i
call close(f1)
end
tr "n1Saved "total-bad" of "total" players."
tr "n1WOF AutoMaintenance Complete!n1"
exit
SYNTAX:;ERROR:;IOERR:;e1="n1 Error: "rc" ("errortext(rc)")"
e2=" Line: "left(sigl,4)"File:";c="`"fp", "ver"'";e2=e2" "c;tr e1;tr e2
logentry e1;logentry e2;e=strip(translate(sourceline(sigl),"\{",""))
do while e~="";e3="Source: "left(e,37);tr e3;logentry e3;e=substr(e,38);end
bufferflush
/**************************************************************************\
\****************************************** Frontiers BBS (716)/823-9892 **/